package com.sport.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sport.entity.vo.RoleAuthority;
import org.apache.ibatis.annotations.Mapper;
import com.sport.entity.SysRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 角色表;(sys_role)表数据库访问层
 * @author: 开心摆烂
 * @date : 2024-11-20
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

    @Select("SELECT permission_id FROM `sys_role_permission` WHERE role_id=#{roleId}")
    List<String> getPermission(@Param("roleId") String roleId);

    boolean insertCheck(RoleAuthority authority);

    boolean deleteCheck(RoleAuthority authority);
}
